home *** CD-ROM | disk | FTP | other *** search
/ 3D GFX / 3D GFX.iso / amiutils / i_l / irit5 / triv_lib / trivcoer.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-31  |  1.7 KB  |  34 lines

  1. /******************************************************************************
  2. * TrivCoer.c - Handle point coercesions/conversions.                  *
  3. *******************************************************************************
  4. * Written by Gershon Elber, Sep. 94.                          *
  5. ******************************************************************************/
  6.  
  7. #include "triv_loc.h"
  8.  
  9. /*****************************************************************************
  10. * DESCRIPTION:                                                               M
  11. * Coerces a trivariate to point type PType.                     M
  12. *                                                                            *
  13. * PARAMETERS:                                                                M
  14. *   TV:       To coerce to a new point type PType.                           M
  15. *   PType:    New point type for TV.                                         M
  16. *                                                                            *
  17. * RETURN VALUE:                                                              M
  18. *   TrivTVStruct *:   A new trivariate with PType as its point type.         M
  19. *                                                                            *
  20. * KEYWORDS:                                                                  M
  21. *   TrivCoerceTVTo, coercion                                                 M
  22. *****************************************************************************/
  23. TrivTVStruct *TrivCoerceTVTo(TrivTVStruct *TV, CagdPointType PType)
  24. {
  25.     TV = TrivTVCopy(TV);
  26.  
  27.     CagdCoercePointsTo(TV -> Points,
  28.                TV -> ULength * TV -> VLength * TV -> WLength,
  29.                TV -> PType, PType);
  30.  
  31.     TV -> PType = PType;
  32.     return TV;
  33. }
  34.